package bankaccount02;

public class BankSimulation  {
    public static void main(String[] args) {
        BankAccount account = new BankAccount();
        Thread customer1 = new Thread(new Runnable() {

            @Override
            public void run() {
                account.deposit(1000);
            }
        }, "客户A");

        Thread customer2 = new Thread(new Runnable() {

            @Override
            public void run() {
                account.deposit(1000);
            }
        }, "客户B");

        Thread customer3 = new Thread(new Runnable() {

            @Override
            public void run() {
                account.deposit(1000);
            }
        }, "客户C");


        customer1.start();
        customer2.start();
        customer3.start();
    }
}
